package com.producer.init;


import com.producer.queue.ChildQueue;
import com.producer.queue.MainQueue;
import com.producer.service.OutPutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component("taskinit")
public class Taskinit {
    @Autowired
    private OutPutService outPutService;
    //初始化
    @PostConstruct
    public void init(){
        Thread mainQueue=new Thread(new MainQueue());
        Thread childQueue=new Thread(new ChildQueue());
        mainQueue.start();
        childQueue.start();
    }
}
